package com.tc.entity;

import com.github.pagehelper.PageInfo;
import lombok.Getter;

/**
 * Created by cai.tian on 2017/12/11.
 */
public class ResponseEnvelope<T> {
    @Getter
    private T data;
    @Getter
    private PageInfo pageInfo;
    @Getter
    private RestApiError error;

    public ResponseEnvelope() {
        this(null, null);
    }

    public ResponseEnvelope(T data) {
        this(data, null);
    }

    public ResponseEnvelope(T data, PageInfo pageInfo) {
        this.data = data;
        this.pageInfo = pageInfo;
    }

    public ResponseEnvelope(RestApiError error) {
        this.error = error;
    }
}
